package com.whfc.emp.service;


import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.emp.dto.AppTrainingDTO;
import com.whfc.emp.dto.AppTrainingQuestionsDTO;
import com.whfc.emp.entity.AppTrainingQuestion;
import com.whfc.emp.param.*;

import java.util.List;
import java.util.Map;

/**
 * @ClasssName AppTrainService
 * @Description 培训考试-培训管理-试题
 * @Author hw
 * @Date 2020/11/26 16:09
 * @Version 1.0
 */
public interface AppTrainingQuestionsService {

    /**
     * 培训管理-试题-列表
     *
     * @param request
     * @return
     * @throws BizException
     */
    PageData<AppTrainingQuestionsDTO> list(AppTrainingQuestionListParam request);

    /**
     * 培训管理-新增试题
     *
     * @param request
     * @throws BizException
     */
    void add(AppTrainingQuestionAddParam request) throws BizException;

    /**
     * 培训管理-编辑试题
     *
     * @param request
     * @throws BizException
     */
    void edit(AppTrainingQuestionEditParam request) throws BizException;

    /**
     * 培训管理-删除试题
     *
     * @param id
     * @throws BizException
     */
    void del(Integer id) throws BizException;


    /**
     * 获取试题
     *
     * @param questionIds
     * @return
     */
    Map<Integer, AppTrainingQuestionsDTO> getQuestionMap(List<Integer> questionIds);

    /**
     * 保存批量试题
     *
     * @param questions
     * @param id
     */
    void saveBatchByTrainingId(List<AppTrainingQuestion> questions, Long id);

    Integer countByTrainingId(Integer id);
}
